import Vue from 'vue'
import VueRouter from 'vue-router'
import login from '@/views/user/login.vue'
import home from '@/views/home/home.vue'
import movie from '@/views/movie/movie.vue'
import qa from '@/views/QA/qa.vue'
import user from '@/views/user/user.vue'
import notfound from '@/views/notfound/notfound.vue'
import means from '@/views/user/means.vue'
import robot from '@/views/user/robot.vue'

Vue.use(VueRouter)

const routes = [
 {
   name:'login',
   path:'/login',
   component:login,
 },
 {
  name:'home',
  path:'/home',
  component:home,
  meta:{ showTab : true}
},
{
  name:'movie',
  path:'/movie',
  component:movie,
  meta:{ showTab : true}
},
{
  name:'qa',
  path:'/qa',
  component:qa,
  meta:{ showTab : true}
},{
  name:'user',
  path:'/user',
  component:user,
  meta:{ showTab : true}
},{
  name:'notfonund',
  path:'/notfound',
  component:notfound,
},{
  name:'means',
  path:'/means',
  component:means,
},
{
  name:'robot',
  path:'/robot',
  component:robot,
},
{
  path:'*',
  redirect:'/notfound'
},{
  path:'/',
  redirect:'/home'
},{
  path:'*',
  redirect:'/notfound'
},


]

const router = new VueRouter({
  routes
})

export default router
